package com.dys.spring.controller;

import com.dys.spring.service.UserService;

/**
 * @Author: 疾风
 * @ClassName: UserController
 * @Description: User服务控制器
 * @CreateDate: 2024/10/18
 * @Version: v1.0.0
 */
public class UserController {
    /**
     * 通过构造器注入
     */
    private UserService userService;

    public UserController(UserService userService) {
        this.userService = userService;
    }

    public void listUsers(){
        userService.findAllUser().forEach(System.out::println);
    }
}
